package com.eastfair.certificate.dao;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.eastfair.boot.mapper.SuperMapper;
import com.eastfair.certificate.dto.StatisticsDTO;
import com.eastfair.certificate.entity.Blacklist;
import com.eastfair.certificate.entity.Certificate;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * 证件设置
 * </p>
 *
 * @author ligang
 * @date 2022-07-21
 */
@Repository
public interface BusinessMapper extends SuperMapper<Blacklist> {

    /**
     * 证件数量+ 领取证件数
     * @param statisticsDTO
     * @return
     */
    @InterceptorIgnore(tenantLine = "true")
    Map queryCertificateNum(@Param("statisticsDTO") StatisticsDTO statisticsDTO);


    /**
     * 证件类型统计
     * @param statisticsDTO
     * @return
     */
    @InterceptorIgnore(tenantLine = "true")
    List<Map> queryCertificateNumOfType(@Param("statisticsDTO") StatisticsDTO statisticsDTO);



    /**
     * 证件状态统计
     * @param statisticsDTO
     * @return
     */
    @InterceptorIgnore(tenantLine = "true")
    List<Map> queryCertificateNumOfOrderStatus(@Param("statisticsDTO") StatisticsDTO statisticsDTO);


    /**
     * 订单统计
     * @param statisticsDTO
     * @return
     */
    @InterceptorIgnore(tenantLine = "true")
    List<Map> queryNumOfOrderNum(@Param("statisticsDTO") StatisticsDTO statisticsDTO);
}
